MuleSoft Accelerator for Manufacturing icon

MuleSoft Accelerator for Manufacturing

(0 reviews)

OSISoft PI setup guide for productive maintenance

OSI PI SCADA System

Configuration Guide

This section explain how to configure several components of OSI PI in order to connect to PI servers to retrieve time series data from PI data server.

Configuration Steps

  1. PI Data server connection
  2. Configure PI Web API
  3. Configure PI Randomizer Interface
  4. Configure PI Points
  5. Use PI Web API to retrieve attributes and values of PI points
  6. PI point configuration used in this use case

PI Data server connection

  • PI data server hosts configuration of PI points, stores values of the PI points and allows PI Web API connect to it and retrieve data from the clients. Make sure your machine can connect to the running instance of the PI data server.
  • Go to the Windows menu items or location of PI system typically located at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PI System.
  • Run PI system explorer and select Servers menu.
  • If you see Data Server (and Asset Server) are connected no further configuration is required. Otherwise select Tools > Options menu.
  • Check PI Trust, uncheck Windows Security and check Allow login prompt. Then when you try to connect to data server it will prompt you with Windows authentication and your windows credentials.

PI Web API configuration

  • PI Web API needs to be configured to retrieve PI points attributes and values using REST.
  • Go to the Windows menu items or location of PI system typically located at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PI System.
  • Run PI Web API Admin Utility and connects to the PI Asset Server instance.
  • Select HTTPS port 443 and Firewall exception.
  • Select Bypass Advanced Certification Check.
  • Select account type and account name.
  • Select AF server and database, and data server.
  • Follow the screens to continue configuration and note down the PI web API url.

Web API System Configuration:

  • This section talks about configuration items which are supported but not configured by default.
  • Open PI System Explorer
  • Click on Database and select Configuration
  • Expand Elements / OSISoft / PI Web API / PI_Server_Host / System Configuration and click on Attributes tab
  • Configure following items
ItemDetailsComments
Basic Auth config- Select AuthenticationMethods
- Value field click on String Array
- Type Basic in value and click on Add
- Click on Check-In button
Needed to authenticate and connect client to web Api. Refer to below screen.
Bulk Request config- If you see IgnoreCacheControlForBulkRequests make sure it is set to True
- Otherwise Click on New Attribute button on top and set the value to IgnoreCacheControlForBulkRequests, type to Boolean and value to True
- Click on Check-In button
Needed for value set URL to get data for multiple points
POST Request config- Set EnableCSRFDefense to falseNeeded for POST to work to avoid 403 suite access denied error

Configure PI Randomizer Interface

Follow these steps to configure the random interface and install it as a Windows service.

  • Run PI Interface Configuration Utility
  • Select Interface > New Windows interface instance from a bat file or from an exe file and browse to Random interface installation directory typically C:\Program Files\PIPC\Interfaces\Random containing random.exe or random.bat file
  • Select Host PI data server and click on add
  • In the general section make sure the point source is R and in the scan frequency, you specify the frequency at which random interface will simulate PI points. You can specify multiple frequencies
  • In the Service section make sure tcp/ip is selected as a dependency

Configure PI points

PI Interface for Random Simulator Data is installed and configured with PI Data Archive, is an excellent source of test data. You can configure points to generate various types of randomized data. The default point source for this interface is R.

  • Point builder will allow you to configure PI points. Run PI System Management Tools and select Points > Point Builder
  • Click on New and provide point details such as

General Tab

  • Name: it must be a unique name across all points, e.g. FlowLevel-M23
  • Descriptor: can be used to store some important info such as machine or location where the point is attached
  • Stored Value: how value is stored in data server, select Real-time data
  • Point Source: source of value, for Random interface select R
  • Point Class: select Classic
  • Point Type: data type of the point such as int, float, string, timestamp, blob or digital
  • Digital Set: if the data type is Digital, select the set of value defined in the Digital Set
  • Eng Units: engineering unit of the point being measured, e.g. PSI for flow, F for temperature

Archive Tab

  • Typical Value: typical value of the point, e.g. 50
  • Zero: minimum value of the point, e.g. 10
  • Span: maximum value of the point, e.g. 100
  • Make sure the Scan and Archiving are selected On

Classic Tab

  • The values in the Location 1 to 5, depends on the Data Type, Scan Class of the random interface being used, desired amount of change between each value, and number of value to change before midpoint resets to current value. Note that not all location values are required for each point.
  • For example
FieldValueDescription
Location1
Location210If the span is 100, it will allow to change value by 1 in each scan (10*(100/1000)) = 1
Location325After 25 random value it will reset to current value
Location41Scan class of PI point. Look at random.bat or Random interface configuration. This says the PI point will be changed as per line 1, so if that is 30 sec, the PI point value will change every 30 seconds.
Location51Number from 0 to 5 depending on point data type
  • Digital States configuration: when point data type is selected as Digital, it's value can be one of value specified in a Digital State.
    • Select Points > Digital States and click on Add icon.
    • Name the set and set of state values with state name.
    • Below screen shows a Digital State for a Maintenance Status which can be 0=Active and 1=Broken.

Use PI Web API to retrieve attributes and values of PI points

Once PI servers, data server, web API, random interface and PI points are configured you can use PI web API to retrieve and update point attributes and values from PI server. The web API provides REST interface to interact with PI server over the web.

Following table describes some of the common endpoints to retrieve PI point information. Note that each points and assets in PI server is identified using a unique webId.

DescriptionWeb API URL
PI Web API home pagehttps://host:port/piwebapi/
Get attributes of all PI pointshttps://host:port/piwebapi/dataservers/DataServer_webId/points
Get attributes of multiple specified PI pointshttps://host:port/piwebapi/points/multiple?webId=Point1_WebId_&webId=Point2_WebId
Get value of a specific PI pointhttps://host:port/piwebapi/streams/Point_webId/value
Get values of multiple specified PI pointshttps://host:port/piwebapi/streamsets/value?webId=Point1_webId_&webId=Point2_webId
Get attributes of multiple specified PI points using POST methodPOST: https://host:port/piwebapi/batch
Body:{ "1" : { "Method": "GET", "Resource": "https://host:port/piwebapi/points/multiple?webId=Point1_webId&webId=Point2webId" } }
Get data values of multiple specified PI points using POST methodPOST: https://host:port/piwebapi/batch
Body:{ "1" : { "Method": "GET", "Resource": "https://host:port/piwebapi/streamsets/value?webId=Point1_webId&webId=Point2_webId" } }

PI point configuration used in this use case

This use case measures vibration delta, temperature, oil level, noise level, and maintenance status of several machines. Following table described configuration of these PI points for one machine.

AttributePoint1Point2Point3Point4Point5
General Tab
NameVibration DeltaTemperatureOil LevelNoise LevelMaintenance Status
DescriptorMachine1Machine1Machine1Machine1Machine1
Stored ValuesReal-time dataReal-time dataReal-time dataReal-time dataReal-time data
Point SourceRRRRR
Point Classclassicclassicclassicclassicclassic
Point TypeInt32Int32Int32Int32Digital
Digital SetMachineStatus
Eng UnitsHzFPercentageDecibels
Display Digits
Archive Tab
Typical Value500125501151
Span10001601001601
Zero10900700
ScanOnOnOnOnOn
ArchivingOnOnOnOnOn
Classic Tab
Location1
Location2
Location3100100100100
Location411111
Location522221
Misc
Data TypeStation DataStation DataStation DataStation DataRandom Data
Scale

Reviews

TypeCustom
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onSep 6, 2022
Asset overview

Asset versions for 1.2.x

Asset versions
VersionActions
1.2.0

Categories

Industry Vertical
ManufacturingNo values left to add
Solution
Accelerator
ManufacturingNo values left to add

Tags